package struts.actionForm;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

public class ActionFormPersonneNom extends ActionForm {

	/**
	 * 
	 */
	private String nom;
	
	public ActionFormPersonneNom()
	{
		this.nom = null;
	}
	
	
	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}


	private static final long serialVersionUID = -5003141374241135414L;
	
	@Override
	public ActionErrors validate(ActionMapping mapping,
			HttpServletRequest request) {
		// TODO Auto-generated method stub
		ActionErrors erreurs = new ActionErrors();
		if(this.nom==null)
			erreurs.add("Nom requis",new ActionMessage("ActionFormPersonneNom.Nom.requis"));
		return erreurs;
	}

}
